package com.kgc.javaweb.enums;


public  enum  CodeMsg {

    USER_EXIST("用户存在",200),

    LOGIN_SUCCESS("登录成功",200),
    LOGIN_FAIL("登录失败",500),
    SELECT_SUCCESS("数据查询成功",0),
    SELECT_FAIL("数据查询失败",500),
    REGISTER_SUCCESS("注册成功,即将跳转登录页",200),
    REGISTER_FAIL("用户注册失败",500),
    UPDATE_SUCCESS("更新成功",200),
    UPDATE_FAIL("更新失败",500),
    ADD_SUCCESS("添加成功",200),
    ADD_FAIL("添加失败",500),
    USER_NOT_EXIST("用户不存在",200),
    DELETE_SUCCESS("删除成功",200),
    DELETE_FAIL("删除失败",500),
    ERR_PASSWORD("用户旧密码输入错误",500),
    SEARCH_SUCCESS("查询成功", 0),
    SEARCH_FAIL("查询失败", 500);







    private String msg;
    private Integer code;

    CodeMsg(String msg,Integer code){
        this.msg = msg;
        this.code =code;
    }

    public String getMsg() {
        return msg;
    }

    public Integer getCode() {
        return code;
    }
}
